<!DOCTYPE html>
<html>

<head>
  <title>Quarkus - Using the MongoDB Client</title>
  <script id="adobe_dtm" src="https://www.redhat.com/dtm.js" type="text/javascript"></script>
  <script src="/assets/javascript/highlight.pack.js" type="text/javascript"></script>
  <META HTTP-EQUIV='Content-Security-Policy' CONTENT="default-src 'none'; script-src 'self' 'unsafe-eval' 'sha256-ANpuoVzuSex6VhqpYgsG25OHWVA1I+F6aGU04LoI+5s=' 'sha256-ipy9P/3rZZW06mTLAR0EnXvxSNcnfSDPLDuh3kzbB1w=' js.bizographics.com https://www.redhat.com assets.adobedtm.com jsonip.com https://ajax.googleapis.com https://www.googletagmanager.com https://www.google-analytics.com https://use.fontawesome.com; style-src 'self' https://fonts.googleapis.com https://use.fontawesome.com; img-src 'self' *; media-src 'self' ; frame-src https://www.googletagmanager.com https://www.youtube.com; frame-ancestors 'none'; base-uri 'none'; object-src 'none'; form-action 'none'; font-src 'self' https://use.fontawesome.com https://fonts.gstatic.com;">
  <META HTTP-EQUIV='X-Frame-Options' CONTENT="DENY">
  <META HTTP-EQUIV='X-XSS-Protection' CONTENT="1; mode=block">
  <META HTTP-EQUIV='X-Content-Type-Options' CONTENT="nosniff">
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="Quarkus: Supersonic Subatomic Java">
  <meta name="twitter:card" content="summary_large_image">
  <meta name="twitter:site" content="@QuarkusIO"> 
  <meta name="twitter:creator" content="@QuarkusIO">
  <meta property="og:url" content="https://quarkus.io/guides/mongodb" />
  <meta property="og:title" content="Quarkus - Using the MongoDB Client" />
  <meta property="og:description" content="Quarkus: Supersonic Subatomic Java" />
  <meta property="og:image" content="/assets/images/quarkus_card.png" />
  <link rel="canonical" href="https://quarkus.io/guides/mongodb">
  <link rel="shortcut icon" type="image/png" href="/favicon.ico" >
  <link rel="stylesheet" href="https://quarkus.io/guides/stylesheet/config.css" />
  <link rel="stylesheet" href="/assets/css/main.css" />
  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous">
  <link rel="alternate" type="application/rss+xml"  href="https://quarkus.io/feed.xml" title="Quarkus">
  <script src="https://quarkus.io/assets/javascript/goan.js" type="text/javascript"></script>
  <script src="https://quarkus.io/assets/javascript/hl.js" type="text/javascript"></script>
</head>

<body class="guides">
  <!-- Google Tag Manager (noscript) -->
  <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NJWS5L"
  height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  <!-- End Google Tag Manager (noscript) -->

  <div class="nav-wrapper">
  <div class="grid-wrapper">
    <div class="width-12-12">
      <input type="checkbox" id="checkbox" />
      <nav id="main-nav" class="main-nav">
  <div class="container">
    <div class="logo-wrapper">
      
        <a href="/"><img src="/assets/images/quarkus_logo_horizontal_rgb_600px_reverse.png" class="project-logo" title="Quarkus"></a>
      
    </div>
    <label class="nav-toggle" for="checkbox">
      <i class="fa fa-bars"></i>
    </label>
    <div id="menu" class="menu">
      <span>
        <a href="/get-started/" class="">Get Started</a>
      </span>
      <span>
        <a href="/guides/" class="active">Guides</a>
      </span>
      <span>
        <a href="/community/" class="">Community</a>
      </span>
      <span>
        <a href="/support/" class="">Support</a>
      </span>
      <span>
        <a href="/blog/" class="">Blog</a>
      </span>
      <span>
        <a href="https://code.quarkus.io" class="button-cta secondary white">Start Coding</a>
      </span>
    </div>
  </div>
      </nav>
    </div>
  </div>
</div>

  <div class="content">
    <div class="guide">
  <div class="width-12-12">
    <h1 class="text-caps">Quarkus - Using the MongoDB Client</h1>
    <div class="hide-mobile toc"><ul class="sectlevel1">
<li><a href="#prerequisites">Prerequisites</a></li>
<li><a href="#architecture">Architecture</a></li>
<li><a href="#solution">Solution</a></li>
<li><a href="#creating-the-maven-project">Creating the Maven project</a></li>
<li><a href="#creating-your-first-json-rest-service">Creating your first JSON REST service</a></li>
<li><a href="#configuring-the-mongodb-database">Configuring the MongoDB database</a></li>
<li><a href="#multiple-mongodb-clients">Multiple MongoDB Clients</a>
<ul class="sectlevel2">
<li><a href="#named-mongo-client-injection">Named Mongo client Injection</a></li>
</ul>
</li>
<li><a href="#running-a-mongodb-database">Running a MongoDB Database</a></li>
<li><a href="#creating-a-frontend">Creating a frontend</a></li>
<li><a href="#reactive">Reactive MongoDB Client</a></li>
<li><a href="#simplifying-mongodb-client-usage-using-bson-codec">Simplifying MongoDB Client usage using BSON codec</a></li>
<li><a href="#the-pojo-codec">The POJO Codec</a></li>
<li><a href="#simplifying-mongodb-with-panache">Simplifying MongoDB with Panache</a></li>
<li><a href="#connection-health-check">Connection Health Check</a></li>
<li><a href="#metrics">Metrics</a></li>
<li><a href="#the-legacy-client">The legacy client</a></li>
<li><a href="#building-a-native-executable">Building a native executable</a></li>
<li><a href="#conclusion">Conclusion</a></li>
<li><a href="#configuration-reference">Configuration Reference</a></li>
</ul></div>
    <div>
      <div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p>MongoDB is a well known NoSQL Database that is widely used.</p>
</div>
<div class="paragraph">
<p>In this guide, we see how you can get your REST services to use the MongoDB database.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="prerequisites"><a class="anchor" href="#prerequisites"></a>Prerequisites</h2>
<div class="sectionbody">
<div class="paragraph">
<p>To complete this guide, you need:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>less than 15 minutes</p>
</li>
<li>
<p>an IDE</p>
</li>
<li>
<p>JDK 1.8+ installed with <code>JAVA_HOME</code> configured appropriately</p>
</li>
<li>
<p>Apache Maven 3.6.2+</p>
</li>
<li>
<p>MongoDB installed or Docker installed</p>
</li>
</ul>
</div>
</div>
</div>
<div class="sect1">
<h2 id="architecture"><a class="anchor" href="#architecture"></a>Architecture</h2>
<div class="sectionbody">
<div class="paragraph">
<p>The application built in this guide is quite simple: the user can add elements in a list using a form and the list is updated.</p>
</div>
<div class="paragraph">
<p>All the information between the browser and the server is formatted as JSON.</p>
</div>
<div class="paragraph">
<p>The elements are stored in MongoDB.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="solution"><a class="anchor" href="#solution"></a>Solution</h2>
<div class="sectionbody">
<div class="paragraph">
<p>We recommend that you follow the instructions in the next sections and create the application step by step.
However, you can go right to the completed example.</p>
</div>
<div class="paragraph">
<p>Clone the Git repository: <code>git clone <a href="https://github.com/quarkusio/quarkus-quickstarts.git" class="bare">https://github.com/quarkusio/quarkus-quickstarts.git</a></code>, or download an <a href="https://github.com/quarkusio/quarkus-quickstarts/archive/master.zip">archive</a>.</p>
</div>
<div class="paragraph">
<p>The solution is located in the <code>mongodb-quickstart</code> <a href="https://github.com/quarkusio/quarkus-quickstarts/tree/master/mongodb-quickstart">directory</a>.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="creating-the-maven-project"><a class="anchor" href="#creating-the-maven-project"></a>Creating the Maven project</h2>
<div class="sectionbody">
<div class="paragraph">
<p>First, we need a new project. Create a new project with the following command:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="shell" class="language-shell hljs">mvn io.quarkus:quarkus-maven-plugin:1.7.0.Final:create \
    -DprojectGroupId=org.acme \
    -DprojectArtifactId=mongodb-quickstart \
    -DclassName="org.acme.mongodb.FruitResource" \
    -Dpath="/fruits" \
    -Dextensions="resteasy-jsonb,mongodb-client,resteasy-mutiny,context-propagation"
cd mongodb-quickstart</code></pre>
</div>
</div>
<div class="paragraph">
<p>This command generates a Maven structure importing the RESTEasy/JAX-RS, JSON-B, Mutiny, Context Propagation and MongoDB Client extensions.
After this, the quarkus-mongodb-client extension has been added to your <code>pom.xml</code>.</p>
</div>
<div class="paragraph">
<p>If you already have your Quarkus project configured, you can add the <code>mongodb-client</code> extension
to your project by running the following command in your project base directory:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="bash" class="language-bash hljs">./mvnw quarkus:add-extension -Dextensions="mongodb-client"</code></pre>
</div>
</div>
<div class="paragraph">
<p>This will add the following to your <code>pom.xml</code>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="xml" class="language-xml hljs">&lt;dependency&gt;
    &lt;groupId&gt;io.quarkus&lt;/groupId&gt;
    &lt;artifactId&gt;quarkus-mongodb-client&lt;/artifactId&gt;
&lt;/dependency&gt;</code></pre>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="creating-your-first-json-rest-service"><a class="anchor" href="#creating-your-first-json-rest-service"></a>Creating your first JSON REST service</h2>
<div class="sectionbody">
<div class="paragraph">
<p>In this example, we will create an application to manage a list of fruits.</p>
</div>
<div class="paragraph">
<p>First, let&#8217;s create the <code>Fruit</code> bean as follows:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="java" class="language-java hljs">package org.acme.mongodb;

import java.util.Objects;

public class Fruit {

    private String name;
    private String description;

    public Fruit() {
    }

    public Fruit(String name, String description) {
        this.name = name;
        this.description = description;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public boolean equals(Object obj) {
        if (!(obj instanceof Fruit)) {
            return false;
        }

        Fruit other = (Fruit) obj;

        return Objects.equals(other.name, this.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(this.name);
    }
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>Nothing fancy. One important thing to note is that having a default constructor is required by the JSON serialization layer.</p>
</div>
<div class="paragraph">
<p>Now create a <code>org.acme.mongodb.FruitService</code> that will be the business layer of our application and store/load the fruits from the mongoDB database.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="java" class="language-java hljs">package org.acme.mongodb;

import com.mongodb.client.MongoClient;
import com.mongodb.client.MongoCollection;
import com.mongodb.client.MongoCursor;
import org.bson.Document;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import java.util.ArrayList;
import java.util.List;

@ApplicationScoped
public class FruitService {

    @Inject MongoClient mongoClient;

    public List&lt;Fruit&gt; list(){
        List&lt;Fruit&gt; list = new ArrayList&lt;&gt;();
        MongoCursor&lt;Document&gt; cursor = getCollection().find().iterator();

        try {
            while (cursor.hasNext()) {
                Document document = cursor.next();
                Fruit fruit = new Fruit();
                fruit.setName(document.getString("name"));
                fruit.setDescription(document.getString("description"));
                list.add(fruit);
            }
        } finally {
            cursor.close();
        }
        return list;
    }

    public void add(Fruit fruit){
        Document document = new Document()
                .append("name", fruit.getName())
                .append("description", fruit.getDescription());
        getCollection().insertOne(document);
    }

    private MongoCollection getCollection(){
        return mongoClient.getDatabase("fruit").getCollection("fruit");
    }
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>Now, edit the <code>org.acme.mongodb.FruitResource</code> class as follows:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="java" class="language-java hljs">@Path("/fruits")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public class FruitResource {

    @Inject FruitService fruitService;

    @GET
    public List&lt;Fruit&gt; list() {
        return fruitService.list();
    }

    @POST
    public List&lt;Fruit&gt; add(Fruit fruit) {
        fruitService.add(fruit);
        return list();
    }
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>The implementation is pretty straightforward and you just need to define your endpoints using the JAX-RS annotations and use the <code>FruitService</code> to list/add new fruits.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="configuring-the-mongodb-database"><a class="anchor" href="#configuring-the-mongodb-database"></a>Configuring the MongoDB database</h2>
<div class="sectionbody">
<div class="paragraph">
<p>The main property to configure is the URL to access to MongoDB, almost all configuration can be included in the connection URI so we advise you to do so, you can find more information in the MongoDB documentation: <a href="https://docs.mongodb.com/manual/reference/connection-string/" class="bare">https://docs.mongodb.com/manual/reference/connection-string/</a></p>
</div>
<div class="paragraph">
<p>A sample configuration should look like this:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="properties" class="language-properties hljs"># configure the mongoDB client for a replica set of two nodes
quarkus.mongodb.connection-string = mongodb://mongo1:27017,mongo2:27017</code></pre>
</div>
</div>
<div class="paragraph">
<p>In this example, we are using a single instance running on localhost:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="properties" class="language-properties hljs"># configure the mongoDB client for a single instance on localhost
quarkus.mongodb.connection-string = mongodb://localhost:27017</code></pre>
</div>
</div>
<div class="paragraph">
<p>If you need more configuration properties, there is a full list at the end of this guide.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="multiple-mongodb-clients"><a class="anchor" href="#multiple-mongodb-clients"></a>Multiple MongoDB Clients</h2>
<div class="sectionbody">
<div class="paragraph">
<p>MongoDB allows you to configure multiple clients.
Using several clients works the same way as having a single client.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="properties" class="language-properties hljs">quarkus.mongodb.connection-string = mongodb://login:pass@mongo1:27017/database

quarkus.mongodb.users.connection-string = mongodb://mongo2:27017/userdb
quarkus.mongodb.inventory.connection-string = mongodb://mongo3:27017/invdb,mongo4:27017/invdb</code></pre>
</div>
</div>
<div class="paragraph">
<p>Notice there&#8217;s an extra bit in the key (the <code>users</code> and <code>inventory</code> segments).
The syntax is as follows: <code>quarkus.mongodb.[optional name.][mongo connection property]</code>.
If the name is omitted, it configures the default client.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
<div class="paragraph">
<p>The use of multiple MongoDB clients enables multi-tenancy for MongoDB by allowing to connect to multiple MongoDB clusters.<br>
If you want to connect to multiple databases inside the same cluster,
multiple clients are <strong>not</strong> necessary as a single client is able to access all databases in the same cluster
(like a JDBC connection is able to access to multiple schemas inside the same database).</p>
</div>
</td>
</tr>
</table>
</div>
<div class="sect2">
<h3 id="named-mongo-client-injection"><a class="anchor" href="#named-mongo-client-injection"></a>Named Mongo client Injection</h3>
<div class="paragraph">
<p>When using multiple clients, each <code>MongoClient</code>, you can select the client to inject using the <code>io.quarkus.mongodb.runtime.MongoClientName</code> qualifier.
Using the above properties to configure three different clients, you can also inject each one as follows:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="java" class="language-java hljs">@Inject
MongoClient defaultMongoClient;

@Inject
@MongoClientName("users")
MongoClient mongoClient1;

@Inject
@MongoClientName("inventory")
ReactiveMongoClient mongoClient2;</code></pre>
</div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="running-a-mongodb-database"><a class="anchor" href="#running-a-mongodb-database"></a>Running a MongoDB Database</h2>
<div class="sectionbody">
<div class="paragraph">
<p>As by default, <code>MongoClient</code> is configured to access a local MongoDB database on port 27017 (the default MongoDB port), if you have a local running database on this port, there is nothing more to do before being able to test it!</p>
</div>
<div class="paragraph">
<p>If you want to use Docker to run a MongoDB database, you can use the following command to launch one:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="shell" class="language-shell hljs">docker run -ti --rm -p 27017:27017 mongo:4.0</code></pre>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="creating-a-frontend"><a class="anchor" href="#creating-a-frontend"></a>Creating a frontend</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Now let&#8217;s add a simple web page to interact with our <code>FruitResource</code>.
Quarkus automatically serves static resources located under the <code>META-INF/resources</code> directory.
In the <code>src/main/resources/META-INF/resources</code> directory, add a <code>fruits.html</code> file with the content from this <a href="https://github.com/quarkusio/quarkus-quickstarts/blob/master/mongodb-quickstart/src/main/resources/META-INF/resources/fruits.html">fruits.html</a> file in it.</p>
</div>
<div class="paragraph">
<p>You can now interact with your REST service:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>start Quarkus with <code>./mvnw compile quarkus:dev</code></p>
</li>
<li>
<p>open a browser to <code><a href="http://localhost:8080/fruits.html" class="bare">http://localhost:8080/fruits.html</a></code></p>
</li>
<li>
<p>add new fruits to the list via the form</p>
</li>
</ul>
</div>
</div>
</div>
<div class="sect1">
<h2 id="reactive"><a class="anchor" href="#reactive"></a>Reactive MongoDB Client</h2>
<div class="sectionbody">
<div class="paragraph">
<p>A reactive MongoDB Client is included in Quarkus.
Using it is as easy as using the classic MongoDB Client.
You can rewrite the previous example to use it like the following.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
<div class="title">Deprecation</div>
<div class="paragraph">
<p>The <code>io.quarkus.mongodb.ReactiveMongoClient</code> client is deprecated and will be removed in the future.
It is recommended to switch to the <code>io.quarkus.mongodb.reactive.ReactiveMongoClient</code> client providing the <code>Mutiny</code> API.</p>
</div>
</td>
</tr>
</table>
</div>
<div class="admonitionblock tip">
<table>
<tr>
<td class="icon">
<i class="fa icon-tip" title="Tip"></i>
</td>
<td class="content">
<div class="title">Mutiny</div>
<div class="paragraph">
<p>The MongoDB reactive client uses Mutiny reactive types, if you&#8217;re not familiar with them, read the <a href="getting-started-reactive#mutiny">Getting Started with Reactive guide</a> first.</p>
</div>
</td>
</tr>
</table>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="java" class="language-java hljs">package org.acme.mongodb;

import io.quarkus.mongodb.reactive.ReactiveMongoClient;
import io.quarkus.mongodb.reactive.ReactiveMongoCollection;
import io.smallrye.mutiny.Uni;
import org.bson.Document;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import java.util.List;

@ApplicationScoped
public class ReactiveFruitService {

    @Inject
    ReactiveMongoClient mongoClient;

    public Uni&lt;List&lt;Fruit&gt;&gt; list() {
        return getCollection().find()
                .map(doc -&gt; {
                    Fruit fruit = new Fruit();
                    fruit.setName(doc.getString("name"));
                    fruit.setDescription(doc.getString("description"));
                    return fruit;
                }).collectItems().asList();
    }

    public Uni&lt;Void&gt; add(Fruit fruit) {
        Document document = new Document()
                .append("name", fruit.getName())
                .append("description", fruit.getDescription());
        return getCollection().insertOne(document)
                .onItem().ignore().andContinueWithNull();
    }

    private ReactiveMongoCollection&lt;Document&gt; getCollection() {
        return mongoClient.getDatabase("fruit").getCollection("fruit");
    }
}</code></pre>
</div>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="java" class="language-java hljs">package org.acme.mongodb;

import io.smallrye.mutiny.Uni;

import java.util.List;

import javax.inject.Inject;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.core.MediaType;

@Path("/reactive_fruits")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public class ReactiveFruitResource {

    @Inject
    ReactiveFruitService fruitService;

    @GET
    public Uni&lt;List&lt;Fruit&gt;&gt; list() {
        return fruitService.list();
    }

    @POST
    public Uni&lt;List&lt;Fruit&gt;&gt; add(Fruit fruit) {
        return fruitService.add(fruit)
                .onItem().ignore().andSwitchTo(this::list);
    }
}</code></pre>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="simplifying-mongodb-client-usage-using-bson-codec"><a class="anchor" href="#simplifying-mongodb-client-usage-using-bson-codec"></a>Simplifying MongoDB Client usage using BSON codec</h2>
<div class="sectionbody">
<div class="paragraph">
<p>By using a Bson <code>Codec</code>, the MongoDB Client will take care of the transformation of your domain object to/from a MongoDB <code>Document</code> automatically.</p>
</div>
<div class="paragraph">
<p>First you need to create a Bson <code>Codec</code> that will tell Bson how to transform your entity to/from a MongoDB <code>Document</code>.
Here we use a <code>CollectibleCodec</code> as our object is retrievable from the database (it has a MongoDB identifier), if not we would have used a <code>Codec</code> instead.
More information in the codec documentation: <a href="https://mongodb.github.io/mongo-java-driver/3.10/bson/codecs" class="bare">https://mongodb.github.io/mongo-java-driver/3.10/bson/codecs</a>.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="java" class="language-java hljs">package org.acme.mongodb.codec;

import com.mongodb.MongoClientSettings;
import org.acme.mongodb.Fruit;
import org.bson.Document;
import org.bson.BsonWriter;
import org.bson.BsonValue;
import org.bson.BsonReader;
import org.bson.BsonString;
import org.bson.codecs.Codec;
import org.bson.codecs.CollectibleCodec;
import org.bson.codecs.DecoderContext;
import org.bson.codecs.EncoderContext;

import java.util.UUID;

public class FruitCodec implements CollectibleCodec&lt;Fruit&gt; {

    private final Codec&lt;Document&gt; documentCodec;

    public FruitCodec() {
        this.documentCodec = MongoClientSettings.getDefaultCodecRegistry().get(Document.class);
    }

    @Override
    public void encode(BsonWriter writer, Fruit fruit, EncoderContext encoderContext) {
        Document doc = new Document();
        doc.put("name", fruit.getName());
        doc.put("description", fruit.getDescription());
        documentCodec.encode(writer, doc, encoderContext);
    }

    @Override
    public Class&lt;Fruit&gt; getEncoderClass() {
        return Fruit.class;
    }

    @Override
    public Fruit generateIdIfAbsentFromDocument(Fruit document) {
        if (!documentHasId(document)) {
            document.setId(UUID.randomUUID().toString());
        }
        return document;
    }

    @Override
    public boolean documentHasId(Fruit document) {
        return document.getId() != null;
    }

    @Override
    public BsonValue getDocumentId(Fruit document) {
        return new BsonString(document.getId());
    }

    @Override
    public Fruit decode(BsonReader reader, DecoderContext decoderContext) {
        Document document = documentCodec.decode(reader, decoderContext);
        Fruit fruit = new Fruit();
        if (document.getString("id") != null) {
            fruit.setId(document.getString("id"));
        }
        fruit.setName(document.getString("name"));
        fruit.setDescription(document.getString("description"));
        return fruit;
    }
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>Then you need to create a <code>CodecProvider</code> to link this <code>Codec</code> to the <code>Fruit</code> class.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="java" class="language-java hljs">package org.acme.mongodb.codec;

import org.acme.mongodb.Fruit;
import org.bson.codecs.Codec;
import org.bson.codecs.configuration.CodecProvider;
import org.bson.codecs.configuration.CodecRegistry;

public class FruitCodecProvider implements CodecProvider {
    @Override
    public &lt;T&gt; Codec&lt;T&gt; get(Class&lt;T&gt; clazz, CodecRegistry registry) {
        if (clazz == Fruit.class) {
            return (Codec&lt;T&gt;) new FruitCodec();
        }
        return null;
    }

}</code></pre>
</div>
</div>
<div class="paragraph">
<p>Quarkus takes care of registering the <code>CodecProvider</code> for you.</p>
</div>
<div class="paragraph">
<p>Finally, when getting the <code>MongoCollection</code> from the database you can use directly the <code>Fruit</code> class instead of the <code>Document</code> one, the codec will automatically map the <code>Document</code> to/from your <code>Fruit</code> class.</p>
</div>
<div class="paragraph">
<p>Here is an example of using a <code>MongoCollection</code> with the <code>FruitCodec</code>.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="java" class="language-java hljs">package org.acme.mongodb;

import com.mongodb.client.MongoClient;
import com.mongodb.client.MongoCollection;
import com.mongodb.client.MongoCursor;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import java.util.ArrayList;
import java.util.List;

@ApplicationScoped
public class CodecFruitService {

    @Inject MongoClient mongoClient;

    public List&lt;Fruit&gt; list(){
        List&lt;Fruit&gt; list = new ArrayList&lt;&gt;();
        MongoCursor&lt;Fruit&gt; cursor = getCollection().find().iterator();

        try {
            while (cursor.hasNext()) {
                list.add(cursor.next());
            }
        } finally {
            cursor.close();
        }
        return list;
    }

    public void add(Fruit fruit){
        getCollection().insertOne(fruit);
    }

    private MongoCollection&lt;Fruit&gt; getCollection(){
        return mongoClient.getDatabase("fruit").getCollection("fruit", Fruit.class);
    }
}</code></pre>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="the-pojo-codec"><a class="anchor" href="#the-pojo-codec"></a>The POJO Codec</h2>
<div class="sectionbody">
<div class="paragraph">
<p>The <a href="http://mongodb.github.io/mongo-java-driver/3.12/bson/pojos">POJO Codec</a> provides a set of annotations that enable the customization of
the way a POJO is mapped to a MongoDB collection and this codec is initialized automatically by Quarkus</p>
</div>
<div class="paragraph">
<p>One of these annotations is the <code>@BsonDiscriminator</code> annotation that allows to storage multiple Java types in a single MongoDB collection by adding
a discriminator field inside the document. It can be useful when working with abstract types or interfaces.</p>
</div>
<div class="paragraph">
<p>Quarkus will automatically register all the classes annotated with <code>@BsonDiscriminator</code> with the POJO codec.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="simplifying-mongodb-with-panache"><a class="anchor" href="#simplifying-mongodb-with-panache"></a>Simplifying MongoDB with Panache</h2>
<div class="sectionbody">
<div class="paragraph">
<p>The <a href="mongodb-panache">MongoDB with Panache</a> extension facilitates the usage of MongoDB by providing active record style entities (and repositories) like you have in <a href="hibernate-orm-panache.html">Hibernate ORM with Panache</a> and focuses on making your entities trivial and fun to write in Quarkus.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="connection-health-check"><a class="anchor" href="#connection-health-check"></a>Connection Health Check</h2>
<div class="sectionbody">
<div class="paragraph">
<p>If you are using the <code>quarkus-smallrye-health</code> extension, <code>quarkus-mongodb</code> will automatically add a readiness health check
to validate the connection to the cluster.</p>
</div>
<div class="paragraph">
<p>So when you access the <code>/health/ready</code> endpoint of your application you will have information about the connection validation status.</p>
</div>
<div class="paragraph">
<p>This behavior can be disabled by setting the <code>quarkus.mongodb.health.enabled</code> property to <code>false</code> in your <code>application.properties</code>.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="metrics"><a class="anchor" href="#metrics"></a>Metrics</h2>
<div class="sectionbody">
<div class="paragraph">
<p>If you are using the <code>quarkus-smallrye-metrics</code> extension, <code>quarkus-mongodb</code> can provide metrics about the connection pools.
This behavior must first be enabled by setting the <code>quarkus.mongodb.metrics.enabled</code> property to <code>true</code> in your <code>application.properties</code>.</p>
</div>
<div class="paragraph">
<p>So when you access the <code>/metrics</code> endpoint of your application you will have information about the connection pool status in the <code>vendor</code> scope.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="the-legacy-client"><a class="anchor" href="#the-legacy-client"></a>The legacy client</h2>
<div class="sectionbody">
<div class="paragraph">
<p>We don&#8217;t include the legacy MongoDB client by default. It contains the now retired MongoDB Java API (DB, DBCollection,&#8230;&#8203; )
and the <code>com.mongodb.MongoClient</code> that is now superseded by <code>com.mongodb.client.MongoClient</code>.</p>
</div>
<div class="paragraph">
<p>If you want to use the legacy API, you need to add the following dependency to your <code>pom.xml</code>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="xml" class="language-xml hljs">&lt;dependency&gt;
    &lt;groupId&gt;org.mongodb&lt;/groupId&gt;
    &lt;artifactId&gt;mongodb-driver-legacy&lt;/artifactId&gt;
&lt;/dependency&gt;</code></pre>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="building-a-native-executable"><a class="anchor" href="#building-a-native-executable"></a>Building a native executable</h2>
<div class="sectionbody">
<div class="paragraph">
<p>You can use the MongoDB client in a native executable.</p>
</div>
<div class="paragraph">
<p>If you want to use SSL/TLS encryption, you need to add these properties in your <code>application.properties</code>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="properties" class="language-properties hljs">quarkus.mongodb.tls=true
quarkus.mongodb.tls-insecure=true # only if TLS certificate cannot be validated</code></pre>
</div>
</div>
<div class="paragraph">
<p>You can then build a native executable with the usual command <code>./mvnw package -Pnative</code>.</p>
</div>
<div class="paragraph">
<p>Running it is as simple as executing <code>./target/mongodb-quickstart-1.0-SNAPSHOT-runner</code>.</p>
</div>
<div class="paragraph">
<p>You can then point your browser to <code><a href="http://localhost:8080/fruits.html" class="bare">http://localhost:8080/fruits.html</a></code> and use your application.</p>
</div>
<div class="admonitionblock warning">
<table>
<tr>
<td class="icon">
<i class="fa icon-warning" title="Warning"></i>
</td>
<td class="content">
<div class="paragraph">
<p>Currently, Quarkus doesn&#8217;t support the <code>mongodb+srv</code> protocol in native mode.</p>
</div>
<div class="paragraph">
<p><a href="https://docs.mongodb.com/manual/core/security-client-side-encryption/">Client-Side Field Level Encryption</a> is also not supported in native mode.</p>
</div>
</td>
</tr>
</table>
</div>
<div class="admonitionblock tip">
<table>
<tr>
<td class="icon">
<i class="fa icon-tip" title="Tip"></i>
</td>
<td class="content">
<div class="paragraph">
<p>If you encounter the following error when running your application in native mode:<br>
<code>Failed to encode 'MyObject'. Encoding 'myVariable' errored with: Can&#8217;t find a codec for class org.acme.MyVariable.</code><br>
This means that the <code>org.acme.MyVariable</code> class is not known to GraalVM, the remedy is to add the <code>@RegisterForReflection</code> annotation to your <code>MyVariable class</code>.</p>
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="sect1">
<h2 id="conclusion"><a class="anchor" href="#conclusion"></a>Conclusion</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Accessing a MongoDB database from a MongoDB Client is easy with Quarkus as it provides configuration and native support for it.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="configuration-reference"><a class="anchor" href="#configuration-reference"></a>Configuration Reference</h2>
<div class="sectionbody">
<div class="paragraph configuration-legend">
<p><span class="icon"><i class="fa fa-lock" title="Fixed at build time"></i></span> Configuration property fixed at build time - All other configuration properties are overridable at runtime</p>
</div>
<table class="tableblock frame-all grid-all stretch configuration-reference searchable">
<colgroup>
<col style="width: 80%;">
<col style="width: 10%;">
<col style="width: 10%;">
</colgroup>
<tbody>
<tr>
<th class="tableblock halign-left valign-top"><p class="tableblock"><a id="quarkus-mongodb_configuration"></a><a href="#quarkus-mongodb_configuration">Configuration property</a></p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Type</p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Default</p></th>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><span class="icon"><i class="fa fa-lock" title="Fixed at build time"></i></span> <a id="quarkus-mongodb_quarkus.mongodb.health.enabled"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.health.enabled">quarkus.mongodb.health.enabled</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Whether or not an health check is published in case the smallrye-health extension is present.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>true</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><span class="icon"><i class="fa fa-lock" title="Fixed at build time"></i></span> <a id="quarkus-mongodb_quarkus.mongodb.metrics.enabled"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.metrics.enabled">quarkus.mongodb.metrics.enabled</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Whether or not metrics are published in case the smallrye-metrics extension is present.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>false</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.connection-string"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.connection-string">quarkus.mongodb.connection-string</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the connection string. The format is: <code>mongodb://[username:password@]host1[:port1][,host2[:port2],&#8230;&#8203;[,hostN[:portN]]][/[database.collection][?options]]</code>
 <code>mongodb://</code> is a required prefix to identify that this is a string in the standard connection format.
 <code>username:password@</code> are optional. If given, the driver will attempt to login to a database after connecting to a database server. For some authentication mechanisms, only the username is specified and the password is not, in which case the ":" after the username is left off as well.
 <code>host1</code> is the only required part of the connection string. It identifies a server address to connect to.
 <code>:portX</code> is optional and defaults to :27017 if not provided.
 <code>/database</code> is the name of the database to login to and thus is only relevant if the <code>username:password@</code> syntax is used. If not specified the <code>admin</code> database will be used by default.
 <code>?options</code> are connection options. Note that if <code>database</code> is absent there is still a <code>/</code> required between the last host and the <code>?</code> introducing the options. Options are name=value pairs and the pairs are separated by "&amp;".
 An alternative format, using the <code>mongodb&#43;srv</code> protocol, is:  mongodb&#43;srv://[username:password@]host[/[database][?options]]
 - <code>mongodb&#43;srv://</code> is a required prefix for this format.
 - <code>username:password@</code> are optional. If given, the driver will attempt to login to a database after connecting to a database server. For some authentication mechanisms, only the username is specified and the password is not, in which case the ":" after the username is left off as well
 - <code>host</code> is the only required part of the URI. It identifies a single host name for which SRV records are looked up from a Domain Name Server after prefixing the host name with <code>"_mongodb._tcp"</code>. The host/port for each SRV record becomes the seed list used to connect, as if each one were provided as host/port pair in a URI using the normal mongodb protocol.
 - <code>/database</code> is the name of the database to login to and thus is only relevant if the <code>username:password@</code> syntax is used. If not specified the "admin" database will be used by default.
 - <code>?options</code> are connection options. Note that if <code>database</code> is absent there is still a <code>/</code> required between the last host and the <code>?</code> introducing the options. Options are name=value pairs and the pairs are separated by "&amp;". Additionally with the mongodb&#43;srv protocol, TXT records are looked up from a Domain Name Server for the given host, and the text value of each one is prepended to any options on the URI itself. Because the last specified value for any option wins, that means that options provided on the URI will override any that are provided via TXT records.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.hosts"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.hosts">quarkus.mongodb.hosts</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the MongoDB server addressed (one if single mode). The addresses are passed as <code>host:port</code>.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">list of string</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>127.0.0.1:27017</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.database"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.database">quarkus.mongodb.database</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configure the database name.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.application-name"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.application-name">quarkus.mongodb.application-name</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the application name.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.max-pool-size"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.max-pool-size">quarkus.mongodb.max-pool-size</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the maximum number of connections in the connection pool.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">int</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.min-pool-size"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.min-pool-size">quarkus.mongodb.min-pool-size</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the minimum number of connections in the connection pool.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">int</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.max-connection-idle-time"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.max-connection-idle-time">quarkus.mongodb.max-connection-idle-time</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Maximum idle time of a pooled connection. A connection that exceeds this limit will be closed.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.max-connection-life-time"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.max-connection-life-time">quarkus.mongodb.max-connection-life-time</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Maximum life time of a pooled connection. A connection that exceeds this limit will be closed.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.wait-queue-timeout"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.wait-queue-timeout">quarkus.mongodb.wait-queue-timeout</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The maximum wait time that a thread may wait for a connection to become available.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.maintenance-frequency"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.maintenance-frequency">quarkus.mongodb.maintenance-frequency</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the time period between runs of the maintenance job.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.maintenance-initial-delay"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.maintenance-initial-delay">quarkus.mongodb.maintenance-initial-delay</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures period of time to wait before running the first maintenance job on the connection pool.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.wait-queue-multiple"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.wait-queue-multiple">quarkus.mongodb.wait-queue-multiple</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>This multiplier, multiplied with the <code>maxPoolSize</code> setting, gives the maximum number of threads that may be waiting for a connection to become available from the pool. All further threads will get an exception right away.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">int</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.connect-timeout"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.connect-timeout">quarkus.mongodb.connect-timeout</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>How long a connection can take to be opened before timing out.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.read-timeout"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.read-timeout">quarkus.mongodb.read-timeout</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>How long a socket read can take before timing out.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.tls-insecure"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.tls-insecure">quarkus.mongodb.tls-insecure</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>If connecting with TLS, this option enables insecure TLS connections.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>false</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.tls"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.tls">quarkus.mongodb.tls</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Whether to connect using TLS.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>false</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.replica-set-name"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.replica-set-name">quarkus.mongodb.replica-set-name</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Implies that the hosts given are a seed list, and the driver will attempt to find all members of the set.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.server-selection-timeout"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.server-selection-timeout">quarkus.mongodb.server-selection-timeout</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>How long the driver will wait for server selection to succeed before throwing an exception.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.local-threshold"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.local-threshold">quarkus.mongodb.local-threshold</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>When choosing among multiple MongoDB servers to send a request, the driver will only send that request to a server whose ping time is less than or equal to the server with the fastest ping time plus the local threshold.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.heartbeat-frequency"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.heartbeat-frequency">quarkus.mongodb.heartbeat-frequency</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The frequency that the driver will attempt to determine the current state of each server in the cluster.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.read-preference"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.read-preference">quarkus.mongodb.read-preference</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the read preferences. Supported values are: <code>primary|primaryPreferred|secondary|secondaryPreferred|nearest</code></p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.connection-string"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.connection-string">quarkus.mongodb."mongo-client-configs".connection-string</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the connection string. The format is: <code>mongodb://[username:password@]host1[:port1][,host2[:port2],&#8230;&#8203;[,hostN[:portN]]][/[database.collection][?options]]</code>
 <code>mongodb://</code> is a required prefix to identify that this is a string in the standard connection format.
 <code>username:password@</code> are optional. If given, the driver will attempt to login to a database after connecting to a database server. For some authentication mechanisms, only the username is specified and the password is not, in which case the ":" after the username is left off as well.
 <code>host1</code> is the only required part of the connection string. It identifies a server address to connect to.
 <code>:portX</code> is optional and defaults to :27017 if not provided.
 <code>/database</code> is the name of the database to login to and thus is only relevant if the <code>username:password@</code> syntax is used. If not specified the <code>admin</code> database will be used by default.
 <code>?options</code> are connection options. Note that if <code>database</code> is absent there is still a <code>/</code> required between the last host and the <code>?</code> introducing the options. Options are name=value pairs and the pairs are separated by "&amp;".
 An alternative format, using the <code>mongodb&#43;srv</code> protocol, is:  mongodb&#43;srv://[username:password@]host[/[database][?options]]
 - <code>mongodb&#43;srv://</code> is a required prefix for this format.
 - <code>username:password@</code> are optional. If given, the driver will attempt to login to a database after connecting to a database server. For some authentication mechanisms, only the username is specified and the password is not, in which case the ":" after the username is left off as well
 - <code>host</code> is the only required part of the URI. It identifies a single host name for which SRV records are looked up from a Domain Name Server after prefixing the host name with <code>"_mongodb._tcp"</code>. The host/port for each SRV record becomes the seed list used to connect, as if each one were provided as host/port pair in a URI using the normal mongodb protocol.
 - <code>/database</code> is the name of the database to login to and thus is only relevant if the <code>username:password@</code> syntax is used. If not specified the "admin" database will be used by default.
 - <code>?options</code> are connection options. Note that if <code>database</code> is absent there is still a <code>/</code> required between the last host and the <code>?</code> introducing the options. Options are name=value pairs and the pairs are separated by "&amp;". Additionally with the mongodb&#43;srv protocol, TXT records are looked up from a Domain Name Server for the given host, and the text value of each one is prepended to any options on the URI itself. Because the last specified value for any option wins, that means that options provided on the URI will override any that are provided via TXT records.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.hosts"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.hosts">quarkus.mongodb."mongo-client-configs".hosts</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the MongoDB server addressed (one if single mode). The addresses are passed as <code>host:port</code>.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">list of string</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>127.0.0.1:27017</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.database"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.database">quarkus.mongodb."mongo-client-configs".database</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configure the database name.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.application-name"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.application-name">quarkus.mongodb."mongo-client-configs".application-name</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the application name.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.max-pool-size"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.max-pool-size">quarkus.mongodb."mongo-client-configs".max-pool-size</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the maximum number of connections in the connection pool.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">int</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.min-pool-size"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.min-pool-size">quarkus.mongodb."mongo-client-configs".min-pool-size</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the minimum number of connections in the connection pool.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">int</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.max-connection-idle-time"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.max-connection-idle-time">quarkus.mongodb."mongo-client-configs".max-connection-idle-time</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Maximum idle time of a pooled connection. A connection that exceeds this limit will be closed.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.max-connection-life-time"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.max-connection-life-time">quarkus.mongodb."mongo-client-configs".max-connection-life-time</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Maximum life time of a pooled connection. A connection that exceeds this limit will be closed.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.wait-queue-timeout"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.wait-queue-timeout">quarkus.mongodb."mongo-client-configs".wait-queue-timeout</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The maximum wait time that a thread may wait for a connection to become available.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.maintenance-frequency"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.maintenance-frequency">quarkus.mongodb."mongo-client-configs".maintenance-frequency</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the time period between runs of the maintenance job.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.maintenance-initial-delay"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.maintenance-initial-delay">quarkus.mongodb."mongo-client-configs".maintenance-initial-delay</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures period of time to wait before running the first maintenance job on the connection pool.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.wait-queue-multiple"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.wait-queue-multiple">quarkus.mongodb."mongo-client-configs".wait-queue-multiple</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>This multiplier, multiplied with the <code>maxPoolSize</code> setting, gives the maximum number of threads that may be waiting for a connection to become available from the pool. All further threads will get an exception right away.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">int</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.connect-timeout"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.connect-timeout">quarkus.mongodb."mongo-client-configs".connect-timeout</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>How long a connection can take to be opened before timing out.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.read-timeout"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.read-timeout">quarkus.mongodb."mongo-client-configs".read-timeout</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>How long a socket read can take before timing out.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.tls-insecure"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.tls-insecure">quarkus.mongodb."mongo-client-configs".tls-insecure</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>If connecting with TLS, this option enables insecure TLS connections.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>false</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.tls"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.tls">quarkus.mongodb."mongo-client-configs".tls</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Whether to connect using TLS.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>false</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.replica-set-name"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.replica-set-name">quarkus.mongodb."mongo-client-configs".replica-set-name</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Implies that the hosts given are a seed list, and the driver will attempt to find all members of the set.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.server-selection-timeout"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.server-selection-timeout">quarkus.mongodb."mongo-client-configs".server-selection-timeout</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>How long the driver will wait for server selection to succeed before throwing an exception.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.local-threshold"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.local-threshold">quarkus.mongodb."mongo-client-configs".local-threshold</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>When choosing among multiple MongoDB servers to send a request, the driver will only send that request to a server whose ping time is less than or equal to the server with the fastest ping time plus the local threshold.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.heartbeat-frequency"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.heartbeat-frequency">quarkus.mongodb."mongo-client-configs".heartbeat-frequency</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The frequency that the driver will attempt to determine the current state of each server in the cluster.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.read-preference"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.read-preference">quarkus.mongodb."mongo-client-configs".read-preference</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the read preferences. Supported values are: <code>primary|primaryPreferred|secondary|secondaryPreferred|nearest</code></p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<th class="tableblock halign-left valign-top"><p class="tableblock"><a id="quarkus-mongodb_quarkus.mongodb.write-concern"></a><a href="#quarkus-mongodb_quarkus.mongodb.write-concern">Write concern</a></p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Type</p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Default</p></th>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.write-concern.safe"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.write-concern.safe">quarkus.mongodb.write-concern.safe</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the safety. If set to <code>true</code>: the driver ensures that all writes are acknowledged by the MongoDB server, or else throws an exception. (see also <code>w</code> and <code>wtimeoutMS</code>). If set fo
 - <code>false</code>: the driver does not ensure that all writes are acknowledged by the MongoDB server.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>true</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.write-concern.journal"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.write-concern.journal">quarkus.mongodb.write-concern.journal</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the journal writing aspect. If set to <code>true</code>: the driver waits for the server to group commit to the journal file on disk. If set to <code>false</code>: the driver does not wait for the server to group commit to the journal file on disk.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>true</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.write-concern.w"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.write-concern.w">quarkus.mongodb.write-concern.w</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>When set, the driver adds <code>w: wValue</code> to all write commands. It requires <code>safe</code> to be <code>true</code>. The value is typically a number, but can also be the <code>majority</code> string.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.write-concern.retry-writes"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.write-concern.retry-writes">quarkus.mongodb.write-concern.retry-writes</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>If set to <code>true</code>, the driver will retry supported write operations if they fail due to a network error.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>false</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.write-concern.w-timeout"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.write-concern.w-timeout">quarkus.mongodb.write-concern.w-timeout</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>When set, the driver adds <code>wtimeout : ms</code> to all write commands. It requires <code>safe</code> to be <code>true</code>.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.write-concern.safe"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.write-concern.safe">quarkus.mongodb."mongo-client-configs".write-concern.safe</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the safety. If set to <code>true</code>: the driver ensures that all writes are acknowledged by the MongoDB server, or else throws an exception. (see also <code>w</code> and <code>wtimeoutMS</code>). If set fo
 - <code>false</code>: the driver does not ensure that all writes are acknowledged by the MongoDB server.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>true</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.write-concern.journal"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.write-concern.journal">quarkus.mongodb."mongo-client-configs".write-concern.journal</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the journal writing aspect. If set to <code>true</code>: the driver waits for the server to group commit to the journal file on disk. If set to <code>false</code>: the driver does not wait for the server to group commit to the journal file on disk.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>true</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.write-concern.w"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.write-concern.w">quarkus.mongodb."mongo-client-configs".write-concern.w</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>When set, the driver adds <code>w: wValue</code> to all write commands. It requires <code>safe</code> to be <code>true</code>. The value is typically a number, but can also be the <code>majority</code> string.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.write-concern.retry-writes"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.write-concern.retry-writes">quarkus.mongodb."mongo-client-configs".write-concern.retry-writes</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>If set to <code>true</code>, the driver will retry supported write operations if they fail due to a network error.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>false</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.write-concern.w-timeout"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.write-concern.w-timeout">quarkus.mongodb."mongo-client-configs".write-concern.w-timeout</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>When set, the driver adds <code>wtimeout : ms</code> to all write commands. It requires <code>safe</code> to be <code>true</code>.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html">Duration</a>
  <a href="#duration-note-anchor" title="More information about the Duration format"><span class="icon"><i class="fa fa-question-circle"></i></span></a></p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<th class="tableblock halign-left valign-top"><p class="tableblock"><a id="quarkus-mongodb_quarkus.mongodb.credentials"></a><a href="#quarkus-mongodb_quarkus.mongodb.credentials">Credentials and authentication mechanism</a></p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Type</p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Default</p></th>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.credentials.username"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.credentials.username">quarkus.mongodb.credentials.username</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the username.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.credentials.password"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.credentials.password">quarkus.mongodb.credentials.password</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the password.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.credentials.auth-mechanism"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.credentials.auth-mechanism">quarkus.mongodb.credentials.auth-mechanism</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the authentication mechanism to use if a credential was supplied. The default is unspecified, in which case the client will pick the most secure mechanism available based on the sever version. For the GSSAPI and MONGODB-X509 mechanisms, no password is accepted, only the username. Supported values: <code>MONGO-CR|GSSAPI|PLAIN|MONGODB-X509</code></p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.credentials.auth-source"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.credentials.auth-source">quarkus.mongodb.credentials.auth-source</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the source of the authentication credentials. This is typically the database that the credentials have been created. The value defaults to the database specified in the path portion of the connection string or in the 'database' configuration property.. If the database is specified in neither place, the default value is <code>admin</code>. This option is only respected when using the MONGO-CR mechanism (the default).</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.credentials.auth-mechanism-properties-auth-mechanism-properties"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.credentials.auth-mechanism-properties-auth-mechanism-properties">quarkus.mongodb.credentials.auth-mechanism-properties</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Allows passing authentication mechanism properties.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>Map&lt;String,String&gt;</code></p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">required <span class="icon"><i class="fa fa-exclamation-circle" title="Configuration property is required"></i></span></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.credentials.username"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.credentials.username">quarkus.mongodb."mongo-client-configs".credentials.username</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the username.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.credentials.password"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.credentials.password">quarkus.mongodb."mongo-client-configs".credentials.password</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the password.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.credentials.auth-mechanism"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.credentials.auth-mechanism">quarkus.mongodb."mongo-client-configs".credentials.auth-mechanism</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the authentication mechanism to use if a credential was supplied. The default is unspecified, in which case the client will pick the most secure mechanism available based on the sever version. For the GSSAPI and MONGODB-X509 mechanisms, no password is accepted, only the username. Supported values: <code>MONGO-CR|GSSAPI|PLAIN|MONGODB-X509</code></p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.credentials.auth-source"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.credentials.auth-source">quarkus.mongodb."mongo-client-configs".credentials.auth-source</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Configures the source of the authentication credentials. This is typically the database that the credentials have been created. The value defaults to the database specified in the path portion of the connection string or in the 'database' configuration property.. If the database is specified in neither place, the default value is <code>admin</code>. This option is only respected when using the MONGO-CR mechanism (the default).</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.credentials.auth-mechanism-properties-auth-mechanism-properties"></a><code><a href="#quarkus-mongodb_quarkus.mongodb.-mongo-client-configs-.credentials.auth-mechanism-properties-auth-mechanism-properties">quarkus.mongodb."mongo-client-configs".credentials.auth-mechanism-properties</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Allows passing authentication mechanism properties.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>Map&lt;String,String&gt;</code></p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">required <span class="icon"><i class="fa fa-exclamation-circle" title="Configuration property is required"></i></span></p></td>
</tr>
</tbody>
</table>
<div id="duration-note-anchor" class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
<div class="title">About the Duration format</div>
<div class="paragraph">
<p>The format for durations uses the standard <code>java.time.Duration</code> format.
You can learn more about it in the <a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html#parse-java.lang.CharSequence-">Duration#parse() javadoc</a>.</p>
</div>
<div class="paragraph">
<p>You can also provide duration values starting with a number.
In this case, if the value consists only of a number, the converter treats the value as seconds.
Otherwise, <code>PT</code> is implicitly prepended to the value to obtain a standard <code>java.time.Duration</code> format.</p>
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
    </div>
  </div>
</div>

  </div>

  <div class="content project-footer">
  <div class="footer-section">
    <div class="logo-wrapper">
      <a href="/"><img src="/assets/images/quarkus_logo_horizontal_rgb_reverse.svg" class="project-logo" title="Quarkus"></a>
    </div>
  </div>
  <div class="grid-wrapper">
    <p class="grid__item width-3-12">Quarkus is open. All dependencies of this project are available under the <a href='https://www.apache.org/licenses/LICENSE-2.0' target='_blank'>Apache Software License 2.0</a> or compatible license.<br /><br />This website was built with <a href='https://jekyllrb.com/' target='_blank'>Jekyll</a>, is hosted on <a href='https://pages.github.com/' target='_blank'>Github Pages</a> and is completely open source. If you want to make it better, <a href='https://github.com/quarkusio/quarkusio.github.io' target='_blank'>fork the website</a> and show us what you’ve got.</p>

    
      <div class="width-1-12 project-links">
        <span>Navigation</span>
        <ul class="footer-links width-1-12">
          
            <li><a href="/">Home</a></li>
          
            <li><a href="/guides">Guides</a></li>
          
            <li><a href="/community/#contributing">Contribute</a></li>
          
            <li><a href="/faq">FAQ</a></li>
          
            <li><a href="/get-started">Get Started</a></li>
          
        </ul>
      </div>
    
      <div class="width-1-12 project-links">
        <span>Contribute</span>
        <ul class="footer-links width-1-12">
          
            <li><a href="https://twitter.com/quarkusio">Follow us</a></li>
          
            <li><a href="https://github.com/quarkusio">GitHub</a></li>
          
            <li><a href="/security">Security&nbsp;policy</a></li>
          
        </ul>
      </div>
    
      <div class="width-1-12 project-links">
        <span>Get Help</span>
        <ul class="footer-links width-1-12">
          
            <li><a href="https://groups.google.com/forum/#!forum/quarkus-dev">Forums</a></li>
          
            <li><a href="https://quarkusio.zulipchat.com">Chatroom</a></li>
          
        </ul>
      </div>
    

    
      <div class="width-3-12 more-links">
        <span>Quarkus is made of community projects</span>
        <ul class="footer-links">
          
            <li><a href="https://vertx.io/" target="_blank">Eclipse Vert.x</a></li>
          
            <li><a href="https://microprofile.io" target="_blank">Eclipse MicroProfile</a></li>
          
            <li><a href="https://hibernate.org" target="_blank">Hibernate</a></li>
          
            <li><a href="https://netty.io" target="_blank">Netty</a></li>
          
            <li><a href="https://resteasy.github.io" target="_blank">RESTEasy</a></li>
          
            <li><a href="https://camel.apache.org" target="_blank">Apache Camel</a></li>
          
            <li><a href="https://code.quarkus.io/" target="_blank">And many more...</a></li>
          
        </ul>
      </div>
    
  </div>
</div>
  <div class="content redhat-footer">
  <div class="grid-wrapper">
    <span class="licence">
      <i class="fab fa-creative-commons"></i><i class="fab fa-creative-commons-by"></i> <a href="https://creativecommons.org/licenses/by/3.0/" target="_blank">CC by 3.0</a> | <a href="https://www.redhat.com/en/about/privacy-policy">Privacy Policy</a>
    </span>
    <span class="redhat">
      Sponsored by
    </span>
    <span class="redhat-logo">
      <a href="https://www.redhat.com/" target="_blank"><img src="/assets/images/redhat_reversed.svg"></a>
    </span>
  </div>
</div>


  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js" integrity="sha384-8gBf6Y4YYq7Jx97PIqmTwLPin4hxIzQw5aDmUg/DDhul9fFpbbLcLh3nTIIDJKhx" crossorigin="anonymous"></script>
  <script type="text/javascript" src="/assets/javascript/mobile-nav.js"></script>
  <script type="text/javascript" src="/assets/javascript/scroll-down.js"></script>
  <script src="/assets/javascript/satellite.js" type="text/javascript"></script>
  <script src="https://quarkus.io/guides/javascript/config.js" type="text/javascript"></script>
  <script src="/assets/javascript/search-filter.js" type="text/javascript"></script>
  <script src="/assets/javascript/back-to-top.js" type="text/javascript"></script>
</body>

</html>
